import java.io.File;

public class IODemo9 {
    public static void main(String[] args) {
        File file = new File("./aaa/111");
        File dest = new File("./aaa/222");
        if(file.renameTo(dest)){
            System.out.println("重命名成功！");
        }else{
            System.out.println("重命名失败！");
        }
    }
}
